#include "document.h"
#include "visitor.h"

#include <iostream>

using namespace std;

Visitor::Visitor(void)
{
}

Visitor::~Visitor(void)
{
}

//////////////////////////////////////////////////////

ShowVisitor::ShowVisitor(void)
{
}

ShowVisitor::~ShowVisitor(void)
{
}

void ShowVisitor::visitBackupDoc(BackupDoc* pBackupDoc)
{
	cout<<"This is "<<pBackupDoc->getName()<<"."<<endl;
}

void ShowVisitor::visitRestoreDoc(RestoreDoc* pRestoreDoc)
{
	cout<<"This is "<<pRestoreDoc->getName()<<"."<<endl;
}

//////////////////////////////////////////////////////

OperationVisitor::OperationVisitor(void)
{
}

OperationVisitor::~OperationVisitor(void)
{
}

void OperationVisitor::visitBackupDoc(BackupDoc* pBackupDoc)
{
	pBackupDoc->operation1();
	pBackupDoc->operation2();
}

void OperationVisitor::visitRestoreDoc(RestoreDoc* pRestoreDoc)
{
	pRestoreDoc->operationA();
	pRestoreDoc->operationB();
}
